home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / MAKEFILE.OVL < prev    next >
Text File  |  1993-03-16  |  25KB  |  675 lines

  1. #    SCCS Id: @(#)Makefile.ovl    3.0    90/06/03
  2. #    PC NetHack 3.0 Makefile for Microsoft(tm) "C" 5.1 -- Pierre Martineau
  3. #    Overlay Arrangement -- Stephen Spackman, Pierre Martineau, Norm Meluch
  4. #    Multiple Compilation Hack and so forth -- Stephen Spackman
  5. #    Additional editing -- Kevin Smolkowski
  6. #
  7. #    Other things that have to be reconfigured are in config.h, pcconf.h,
  8. #    and possibly system.h.
  9. #
  10. #    Nota Bene: OVERLAY *must* be defined in pcconf.h to use this makefile!
  11. #    Also: Rename this file to "makefile", some targets rely on it.
  12. # -----------------------------------------------------------------------------
  13. #    In addition to your C compiler,
  14. #
  15. #    if you want to change        you will need a
  16. #    files with suffix        workalike for
  17. #           .y                yacc
  18. #           .l                lex
  19. #           .asm                masm
  20. # -----------------------------------------------------------------------------
  21. #    As it is set up, this makefile requires that exesmurf (the
  22. #    NetHack overlay-aware .exe header editor) be on your path or in the
  23. #    $(SRC) directory. If you wish to change the path or use Microsoft
  24. #    EXEMOD instead, see the symbols EXEPATCH and EXEFLAGS.
  25. #
  26. # *****************************************************************************
  27. # ************************ Compiler Info **************************************
  28. # *****************************************************************************
  29. CC     = cl /c
  30. LINK     = link
  31. MODEL     = L
  32. ASM     = masm
  33. EXEPATCH = exesmurf
  34. # $(MAKE) macro is often predefined, so we use $(MAKEBIN) instead.
  35. MAKEBIN = make
  36. # For those of us who have these on PC.
  37. # YACC     = yacc
  38. # LEX     = lex
  39. YACC    = bison -y
  40. LEX    = flex
  41. # Standard file names may vary in PC installations.
  42. YTABC    = y_tab.c
  43. YTABH    = y_tab.h
  44. LEXYYC    = lexyy.c
  45. # Register bug, remove stack probes...
  46. # /Gt22 is currently about the largest value that keeps the initialised data
  47. # segment below 64K (and keeps the linker happy).
  48. # 286 or higher machines can use the /G2 CFLAG option for better performance.
  49. CFLAGS    = /A$(MODEL) /Oa /Gs /Gt22 /Zp1 /W0 /I$(INCL)
  50. COSPACE = /Os
  51. COSPEED = /Os  # MSC 5.1 seems to be broken, or maybe it's the NetHack code.
  52. #              # Either way, setting COSPEED to /Ot wreaked jolly flaming havoc.
  53. #
  54. LFLAGS    = /noi /seg:512 /map /st:4096
  55. #
  56. # Available assembler flags:
  57. #    /Di386    = Use 386 specific enhancements
  58. #    /DNOEMS = Do not use EMS memory
  59. #    /DDEBUG = Report memory usage on startup
  60. AFLAGS    = /MX
  61. #
  62. ###############################################################################
  63. # Use the first line if you are using EXESMURF or the second for EXEMOD.
  64. EXEFLAGS = /max4500 /min4500
  65. # EXEFLAGS = /max 1194 /min 1194
  66. ###############################################################################
  67. #
  68. # *****************************************************************************
  69. # ********* Directories (makedefs hardcodes these, don't change them) *********
  70. # *****************************************************************************
  71. #
  72. INCL    = ..\include
  73. AUX    = ..\auxil
  74. SRC    = ..\src
  75. OTHERS    = ..\others
  76. OBJ    = $(SRC)\o
  77. #
  78. # *****************************************************************************
  79. # ************************ Local Variables ************************************
  80. # *****************************************************************************
  81. #
  82. # The game name
  83. GAME     = NetHack
  84. #
  85. # The default make target (so just typing 'make' is useful)
  86. DEFAULT  : $(GAME)
  87. #
  88. # The game directory
  89. # make sure GAMEDIR exists!
  90. GAMEDIR  = ..
  91. #
  92. # The game filename
  93. GAMEFILE = $(GAMEDIR)\$(GAME).exe
  94. #
  95. # Target environment prefix
  96. TARG     = pc
  97. #
  98. # Overlay manager object file.
  99. OVLMGR     = ovlmgr.obj
  100. #
  101. # Termcap routines.
  102. TERMCAPS = $(SRC)\termlib.lib
  103. #
  104. ###############################################################################
  105. # Switch the following lines if you have a MASM compatible assembler.
  106. # $(OBJ)\$(OVLMGR):
  107. $(OBJ)\$(OVLMGR): ; copy $(OTHERS)\$(OVLMGR) $(OBJ)\$(OVLMGR)
  108. ###############################################################################
  109. # If you have yacc and lex programs and make any changes, comment out the
  110. # upper two targets and uncomment the lower two.
  111. do_yacc: yacc_msg
  112. do_lex:  lex_msg
  113. # do_yacc: yacc_act
  114. # do_lex:  lex_act
  115. ###############################################################################
  116. # Optional high-quality BSD random number generation routines (see pcconf.h).
  117. # Set to nothing if not used.
  118. RANDOM     = $(OBJ)\random.o
  119. # RANDOM =
  120. ###############################################################################
  121. # Optional C library specifier for those with non-standard libraries or
  122. # a multiple-target library setup.
  123. # CLIB       = llibcer /nod
  124. CLIB     =
  125. ###############################################################################
  126. # If TERMLIB is NOT #defined in the source, comment out the lower line and
  127. # uncomment the upper. Don't forget to copy the $(TERMCAPS) file to the
  128. # $(SRC) directory if you have uncommented the lower line.
  129. # TERMLIB  =
  130. TERMLIB  = $(TERMCAPS)
  131. ###############################################################################
  132. #
  133. # nothing below this line should have to be changed
  134.  
  135. ROOT =  $(OBJ)\$(OVLMGR) $(OBJ)\trampoli.o $(OBJ)\main.o $(OBJ)\msdos.o \
  136.     $(OBJ)\alloc.o $(OBJ)\random.o $(OBJ)\decl.o $(OBJ)\monst.o \
  137.     $(OBJ)\objects.o $(OBJ)\invent.0 $(OBJ)\mkobj.0 $(OBJ)\mkroom.0 \
  138.     $(OBJ)\rnd.0 $(OBJ)\termcap.0
  139. # main monster code
  140. OVL01 = $(OBJ)\cmd.0 $(OBJ)\dbridge.0 $(OBJ)\dog.0 $(OBJ)\engrave.0-1 \
  141.     $(OBJ)\hack.0 $(OBJ)\mon.0-1 $(OBJ)\mondata.0-1 $(OBJ)\monmove.0-1 \
  142.     $(OBJ)\mthrowu.0 $(OBJ)\priest.0 $(OBJ)\shk.0 $(OBJ)\track.0 \
  143.     $(OBJ)\trap.0-1 $(OBJ)\were.0
  144. # pet code
  145. OVL02 = $(OBJ)\apply.0 $(OBJ)\dog.1 $(OBJ)\dogmove.o
  146. # advanced monsters
  147. OVL03 = $(OBJ)\demon.o $(OBJ)\mcastu.o
  148. OVL04 = $(OBJ)\priest.1-b
  149. OVL05 = $(OBJ)\shk.1-b
  150. OVL06 = $(OBJ)\were.1-b
  151. OVL07 = $(OBJ)\wizard.1-b
  152. OVL08 = $(OBJ)\worm.o
  153. # main people things: you take your turn
  154. OVL09 = $(OBJ)\allmain.0 $(OBJ)\artifact.0 $(OBJ)\attrib.1 $(OBJ)\cmd.1 \
  155.     $(OBJ)\do.1 $(OBJ)\do.3 $(OBJ)\eat.0 $(OBJ)\engrave.2 \
  156.     $(OBJ)\getline.0-1 $(OBJ)\hack.1 $(OBJ)\lock.0 $(OBJ)\mail.0 \
  157.     $(OBJ)\pickup.1 $(OBJ)\pri.1 $(OBJ)\prisym.1 $(OBJ)\sounds.0 \
  158.     $(OBJ)\timeout.0 $(OBJ)\track.1 $(OBJ)\vault.0 $(OBJ)\wizard.0
  159. OVL10 = $(OBJ)\attrib.0
  160. OVL11 = $(OBJ)\attrib.2-b $(OBJ)\exper.o
  161. OVL12 = $(OBJ)\artifact.2 $(OBJ)\eat.1 $(OBJ)\invent.1
  162. OVL13 = $(OBJ)\makemon.0-2 $(OBJ)\mkobj.1
  163. OVL14 = $(OBJ)\makemon.b
  164. OVL15 = $(OBJ)\mkobj.2-b
  165. OVL16 = $(OBJ)\hack.2
  166. OVL17 = $(OBJ)\mhitm.1-b
  167. OVL18 = $(OBJ)\mthrowu.1
  168. OVL19 = $(OBJ)\mthrowu.2-b
  169. OVL20 = $(OBJ)\allmain.1 $(OBJ)\mhitm.0 $(OBJ)\mhitu.0-1 $(OBJ)\rnd.1 \
  170.     $(OBJ)\weapon.0-1
  171. OVL21 = $(OBJ)\mon.2-b $(OBJ)\trap.2
  172. OVL22 = $(OBJ)\artifact.1 $(OBJ)\search.0 $(OBJ)\uhitm.o $(OBJ)\weapon.2-b
  173. OVL23 = $(OBJ)\do_wear.0-1 $(OBJ)\mhitu.2-b
  174. OVL24 = $(OBJ)\steal.0-1
  175. OVL25 = $(OBJ)\monmove.2-b $(OBJ)\steal.2-b
  176. OVL26 = $(OBJ)\rnd.2-b
  177. OVL27 = $(OBJ)\do_wear.2 $(OBJ)\getline.b $(OBJ)\mondata.2 $(OBJ)\objnam.0-1 \
  178.     $(OBJ)\pager.0 $(OBJ)\polyself.0-1
  179. OVL28 = $(OBJ)\do_name.0
  180. OVL29 = $(OBJ)\objnam.2-b
  181. OVL30 = $(OBJ)\pager.1-b
  182. OVL31 = $(OBJ)\pri.0 $(OBJ)\prisym.0 $(OBJ)\topl.0
  183. OVL32 = $(OBJ)\pri.b $(OBJ)\topl.1-2
  184. OVL33 = $(OBJ)\prisym.2
  185. OVL34 = $(OBJ)\prisym.b
  186. OVL35 = $(OBJ)\topl.b
  187. OVL36 = $(OBJ)\termcap.1 $(OBJ)\unix.0
  188. OVL37 = $(OBJ)\termcap.2-b
  189. OVL38 = $(OBJ)\dog.b $(OBJ)\sounds.1-b
  190. OVL39 = $(OBJ)\read.0
  191. OVL40 = $(OBJ)\invent.b
  192. OVL41 = $(OBJ)\hack.b
  193. OVL42 = $(OBJ)\mondata.b $(OBJ)\timeout.1-b
  194. OVL43 = $(OBJ)\do.0 $(OBJ)\invent.3
  195. OVL44 = $(OBJ)\cmd.2-b $(OBJ)\getline.2 $(OBJ)\write.o
  196. OVL45 = $(OBJ)\apply.2-b
  197. OVL46 = $(OBJ)\do.b
  198. OVL47 = $(OBJ)\dokick.o
  199. OVL48 = $(OBJ)\dothrow.o
  200. OVL49 = $(OBJ)\eat.2-b
  201. OVL50 = $(OBJ)\invent.2 $(OBJ)\pickup.0 $(OBJ)\pickup.2-b
  202. OVL51 = $(OBJ)\lock.1-b
  203. OVL52 = $(OBJ)\polyself.2-b
  204. OVL53 = $(OBJ)\potion.o
  205. OVL54 = $(OBJ)\pray.o
  206. OVL55 = $(OBJ)\read.1-b $(OBJ)\spell.o
  207. OVL56 = $(OBJ)\search.1-b
  208. # clothing stuff
  209. OVL57 = $(OBJ)\do_wear.b $(OBJ)\wield.o $(OBJ)\worn.o
  210. # Zappage
  211. OVL58 = $(OBJ)\pri.2 $(OBJ)\zap.o
  212. OVL59 = $(OBJ)\dbridge.1-b
  213. OVL60 = $(OBJ)\trap.b
  214. # Unusual circumstances
  215. OVL61 = $(OBJ)\artifact.b $(OBJ)\do_name.1-b $(OBJ)\fountain.o $(OBJ)\music.o \
  216.     $(OBJ)\rumors.o $(OBJ)\shknam.0 $(OBJ)\sit.o $(OBJ)\vault.1-b
  217. # Uppers and Downers
  218. # Note: version.o is in OVL62, but in a special way.  See below.
  219. OVL62 = $(OBJ)\allmain.2-b $(OBJ)\end.o $(OBJ)\engrave.b $(OBJ)\mail.1-b \
  220.     $(OBJ)\o_init.o $(OBJ)\options.o $(OBJ)\restore.o $(OBJ)\rip.o \
  221.     $(OBJ)\save.o $(OBJ)\shknam.1-b $(OBJ)\topten.o $(OBJ)\tty.o \
  222.     $(OBJ)\u_init.o $(OBJ)\unix.1-b
  223. # Levelling
  224. OVL63 = $(OBJ)\apply.1 $(OBJ)\bones.o $(OBJ)\do.2 $(OBJ)\dog.2 \
  225.     $(OBJ)\extralev.o $(OBJ)\mklev.o $(OBJ)\mkmaze.o $(OBJ)\mkroom.1-b \
  226.     $(OBJ)\sp_lev.o $(OBJ)\track.2-b
  227.  
  228.  
  229. # *****************************************************************************
  230. # ************************* Make Objects **************************************
  231. # *****************************************************************************
  232.  
  233. MOBJ = $(OVL01) $(OVL02) $(OVL03) $(OVL04) $(OVL05) $(OVL06) $(OVL07) $(OVL08)\
  234.        $(OVL09) $(OVL10) $(OVL11) $(OVL12) $(OVL13) $(OVL14) $(OVL15) $(OVL16)\
  235.        $(OVL17) $(OVL18) $(OVL19) $(OVL20) $(OVL21) $(OVL22) $(OVL23) $(OVL24)\
  236.        $(OVL25) $(OVL26) $(OVL27) $(OVL28) $(OVL29) $(OVL30) $(OVL31) $(OVL32)\
  237.        $(OVL33) $(OVL34) $(OVL35) $(OVL36) $(OVL37) $(OVL38) $(OVL39) $(OVL40)\
  238.        $(OVL41) $(OVL42) $(OVL43) $(OVL44) $(OVL45) $(OVL46) $(OVL47) $(OVL48)\
  239.        $(OVL49) $(OVL50) $(OVL51) $(OVL52) $(OVL53) $(OVL54) $(OVL55) $(OVL56)\
  240.        $(OVL57) $(OVL58) $(OVL59) $(OVL60) $(OVL61) $(OVL62) $(OVL63)
  241.  
  242. VOBJ =    $(ROOT) $(MOBJ)
  243.  
  244. HOBJ =    $(VOBJ) $(OBJ)\version.o
  245.  
  246. # object files for makedefs
  247. MAKEOBJS    =    $(OBJ)\makedefs.o $(OBJ)\alloc.o    $(OBJ)\monst.o    \
  248.         $(OBJ)\objects.o  $(OBJ)\panic.o
  249.  
  250. OVERLAYS = ($(OVL01)) ($(OVL02)) ($(OVL03)) ($(OVL04)) ($(OVL05)) ($(OVL06)) \
  251.        ($(OVL07)) ($(OVL08)) ($(OVL09)) ($(OVL10)) ($(OVL11)) ($(OVL12)) \
  252.        ($(OVL13)) ($(OVL14)) ($(OVL15)) ($(OVL16)) ($(OVL17)) ($(OVL18)) \
  253.        ($(OVL19)) ($(OVL20)) ($(OVL21)) ($(OVL22)) ($(OVL23)) ($(OVL24)) \
  254.        ($(OVL25)) ($(OVL26)) ($(OVL27)) ($(OVL28)) ($(OVL29)) ($(OVL30)) \
  255.        ($(OVL31)) ($(OVL32)) ($(OVL33)) ($(OVL34)) ($(OVL35)) ($(OVL36)) \
  256.        ($(OVL37)) ($(OVL38)) ($(OVL39)) ($(OVL40)) ($(OVL41)) ($(OVL42)) \
  257.        ($(OVL43)) ($(OVL44)) ($(OVL45)) ($(OVL46)) ($(OVL47)) ($(OVL48)) \
  258.        ($(OVL49)) ($(OVL50)) ($(OVL51)) ($(OVL52)) ($(OVL53)) ($(OVL54)) \
  259.        ($(OVL55)) ($(OVL56)) ($(OVL57)) ($(OVL58)) ($(OVL59)) ($(OVL60)) \
  260.        ($(OVL61)) ($(OVL62)      $(OBJ)\version.o) ($(OVL63))
  261.  
  262. # object files for special levels compiler
  263. SPLEVOBJS   =    $(OBJ)\lev_comp.o $(OBJ)\lev_lex.o  $(OBJ)\lev_main.o \
  264.         $(OBJ)\alloc.o      $(OBJ)\monst.o    $(OBJ)\objects.o  \
  265.         $(OBJ)\panic.o
  266.  
  267. # *****************************************************************************
  268. # ************************** Header Objects ***********************************
  269. # *****************************************************************************
  270.  
  271. PCCONF_H   = $(INCL)\$(TARG)conf.h $(INCL)\msdos.h    $(INCL)\system.h
  272. GLOBAL_H   = $(PCCONF_H)       $(INCL)\coord.h    $(INCL)\global.h
  273. CONFIG_H   = $(GLOBAL_H)       $(INCL)\config.h   $(INCL)\tradstdc.h
  274. PERMONST_H = $(INCL)\permonst.h    $(INCL)\monattk.h  $(INCL)\monflag.h
  275. YOUPROP_H  = $(PERMONST_H)       $(INCL)\prop.h     $(INCL)\mondata.h \
  276.          $(INCL)\pm.h       $(INCL)\youprop.h
  277. YOU_H       = $(YOUPROP_H)       $(INCL)\attrib.h   $(INCL)\monst.h \
  278.          $(INCL)\you.h
  279. DECL_H       = $(YOU_H)           $(INCL)\decl.h     $(INCL)\obj.h \
  280.          $(INCL)\onames.h       $(INCL)\spell.h    $(INCL)\color.h
  281. HACK_H       = $(CONFIG_H)       $(DECL_H)          $(INCL)\trap.h \
  282.          $(INCL)\flag.h       $(INCL)\gold.h     $(INCL)\mkroom.h \
  283.          $(INCL)\monsym.h       $(INCL)\objclass.h $(INCL)\rm.h \
  284.          $(INCL)\trampoli.h    $(INCL)\hack.h
  285.  
  286. # *****************************************************************************
  287. # ************************ File Dependencies **********************************
  288. # *****************************************************************************
  289.  
  290. # Due to an NDMake inadequacy these must accord with a topological sort of the
  291. # generated-from relation... output on the left, input on the right. Trust me.
  292. .SUFFIXES:  .exe .0 .0-1 .0-2 .0-3 .1 .1-2 .1-3 .1-b .2 .2-3 .2-b .3 .3-b .b \
  293.         .o .c .y .l .obj .asm
  294.  
  295. .c.o:
  296.     $(CC) $(CFLAGS) $(COSPACE) /Fo$(OBJ)\$*.o $*.c
  297. .c.0:
  298.     $(CC) $(CFLAGS) $(COSPEED) /DOVL0 /NT$*.0 /Fo$(OBJ)\$*.0 $*.c
  299. .c.0-1:
  300.     $(CC) $(CFLAGS) $(COSPEED) /DOVL0 /DOVL1 /NT$*.0-1 /Fo$(OBJ)\$*.0-1 $*.c
  301. .c.0-2:
  302.     $(CC) $(CFLAGS) $(COSPACE) /DOVL0 /DOVL1 /DOVL2 /NT$*.0-2 /Fo$(OBJ)\$*.0-2 $*.c
  303. .c.0-3:
  304.     $(CC) $(CFLAGS) $(COSPACE) /DOVL0 /DOVL1 /DOVL2 /DOVL3 /NT$*.0-3 /Fo$(OBJ)\$*.0-3 $*.c
  305. .c.1:
  306.     $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /NT$*.1 /Fo$(OBJ)\$*.1 $*.c
  307. .c.1-2:
  308.     $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /NT$*.1-2 /Fo$(OBJ)\$*.1-2 $*.c
  309. .c.1-3:
  310.     $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /DOVL3 /NT$*.1-3 /Fo$(OBJ)\$*.1-3 $*.c
  311. .c.1-b:
  312.     $(CC) $(CFLAGS) $(COSPACE) /DOVL1 /DOVL2 /DOVL3 /DOVLB /NT$*.1-b /Fo$(OBJ)\$*.1-b $*.c
  313. .c.2:
  314.     $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /NT$*.2 /Fo$(OBJ)\$*.2 $*.c
  315. .c.2-3:
  316.     $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /DOVL3 /NT$*.2-3 /Fo$(OBJ)\$*.2-3 $*.c
  317. .c.2-b:
  318.     $(CC) $(CFLAGS) $(COSPACE) /DOVL2 /DOVL3 /DOVLB /NT$*.2-b /Fo$(OBJ)\$*.2-b $*.c
  319. .c.3:
  320.     $(CC) $(CFLAGS) $(COSPACE) /DOVL3 /NT$*.3 /Fo$(OBJ)\$*.3 $*.c
  321. .c.3-b:
  322.     $(CC) $(CFLAGS) $(COSPACE) /DOVL3 /DOVLB /NT$*.3-b /Fo$(OBJ)\$*.3-b $*.c
  323. .c.b:
  324.     $(CC) $(CFLAGS) $(COSPACE) /DOVLB /NT$*.b /Fo$(OBJ)\$*.b $*.c
  325. .asm.obj:
  326.     $(ASM) $(AFLAGS) $*.asm,$(OBJ)\$*.obj ;
  327.  
  328. $(GAME): $(GAMEFILE)
  329.  
  330. $(GAME).exe: $(GAMEFILE)
  331.  
  332. $(GAMEFILE): $(OBJ) $(HOBJ)
  333.     @echo Loading....
  334.     $(LINK) $(ROOT) $(OVERLAYS),$(GAMEFILE),$(GAME),$(CLIB) $(TERMLIB) $(LFLAGS) ;
  335.     $(EXEPATCH) $(GAMEFILE) $(EXEFLAGS)
  336.     @echo NetHack is up to date.
  337.  
  338. $(OBJ):
  339.     if not exist .\$(OBJ)\*.* mkdir $(OBJ)
  340.  
  341. #    The following 3 modules vary depending on what OS you are using.
  342.  
  343. $(OBJ)\main.o:    $(HACK_H) $(TARG)main.c
  344.     $(CC) $(CFLAGS) $(COSPACE)  /Fo.\$(OBJ)\main.o $(TARG)main.c
  345.  
  346. $(OBJ)\tty.o:    $(HACK_H) $(INCL)\func_tab.h $(TARG)tty.c
  347.     $(CC) $(CFLAGS) $(COSPACE)  /Fo.\$(OBJ)\tty.o  $(TARG)tty.c
  348.  
  349. $(OBJ)\unix.0:    $(HACK_H) $(TARG)unix.c
  350.     $(CC) $(CFLAGS) $(COSPEED)  /DOVL0 /Fo.\$(OBJ)\unix.0 $(TARG)unix.c
  351. $(OBJ)\unix.1-b:    $(HACK_H) $(TARG)unix.c
  352.     $(CC) $(CFLAGS) $(COSPACE)  /DOVL1 /DOVL2 /DOVL3 /DOVLB /Fo.\$(OBJ)\unix.1-b $(TARG)unix.c
  353.  
  354. $(OBJ)\makedefs.o:    $(INCL)\config.h $(INCL)\permonst.h $(INCL)\objclass.h
  355.  
  356. makedefs.exe:    $(MAKEOBJS)
  357.     $(LINK) $(LFLAGS) $(MAKEOBJS), makedefs.exe,, $(CLIB);
  358.  
  359. #    Targets for the special levels compiler
  360.  
  361. lev_comp.c: lev_comp.y
  362.     $(MAKEBIN) do_yacc
  363.  
  364. lev_lex.c:  lev_comp.l
  365.     $(MAKEBIN) do_lex
  366.  
  367. yacc_msg:
  368.     @echo lev_comp.y has changed. To update lev_comp.c and lev_comp.h run YACC.
  369.  
  370. yacc_act:
  371.     $(YACC) -d lev_comp.y
  372.     copy $(YTABC) lev_comp.c
  373.     copy $(YTABH) $(INCL)\lev_comp.h
  374.     del $(YTABC)
  375.     del $(YTABH)
  376.  
  377. lex_msg:
  378.     @echo lev_comp.l has changed. To update lev_lex.c run LEX.
  379.  
  380. lex_act:
  381.     $(LEX) lev_comp.l
  382.     copy $(LEXYYC) lev_lex.c
  383.     del $(LEXYYC)
  384.  
  385. #    This is stupid but since the default rule does not work here ...
  386.  
  387. $(OBJ)\lev_comp.o:    $(HACK_H)   $(INCL)\sp_lev.h    lev_comp.c
  388.     $(CC) $(CFLAGS) /Fo$(OBJ)\$*.o $*.c
  389. $(OBJ)\lev_lex.o:    $(HACK_H)   $(INCL)\sp_lev.h    $(INCL)\lev_comp.h \
  390.             lev_lex.c
  391.     $(CC) $(CFLAGS) /Fo$(OBJ)\$*.o $*.c
  392.  
  393. lev_comp.exe:    $(SPLEVOBJS)
  394.     $(LINK) $(LFLAGS) $(SPLEVOBJS),lev_comp.exe,, $(CLIB);
  395.  
  396. # *****************************************************************************
  397. # *************************  Makedefs Stuff ***********************************
  398. # *****************************************************************************
  399. #    The following include files depend on makedefs to be created.
  400. #    date.h should be remade any time any of the source or include code
  401. #    is modified.
  402.  
  403. $(INCL)\date.h: $(VOBJ) makedefs.exe
  404.     .\makedefs -v
  405.  
  406. $(INCL)\onames.h: makedefs.exe
  407.     .\makedefs -o
  408.  
  409. $(INCL)\pm.h: makedefs.exe
  410.     .\makedefs -p
  411.  
  412. $(INCL)\trap.h: makedefs.exe
  413.     .\makedefs -t
  414.  
  415. data:    $(AUX)\data.bas makedefs.exe
  416.     .\makedefs -d
  417.  
  418. rumors: $(AUX)\rumors.tru $(AUX)\rumors.fal makedefs.exe
  419.     .\makedefs -r
  420.  
  421. # *****************************************************************************
  422. # ************************ Secondary targets **********************************
  423. # *****************************************************************************
  424.  
  425. all:    install
  426.  
  427. install:    $(OBJ) lev_comp.exe $(GAMEFILE) auxil.tag install.tag
  428.     @echo Don't forget to check HACKDIR in NetHack.cnf.
  429.     @echo Done.
  430.  
  431. install.tag:
  432.     copy $(OTHERS)\termcap        $(GAMEDIR)
  433.     copy $(AUX)\*.            $(GAMEDIR)
  434.     del  $(GAMEDIR)\MacHelp
  435.     copy $(OTHERS)\NetHack.cnf    $(GAMEDIR)
  436.     echo install done > install.tag
  437.  
  438. spec_lev.tag: lev_comp.exe $(AUX)\castle.des $(AUX)\endgame.des $(AUX)\tower.des
  439.     lev_comp $(AUX)\castle.des
  440.     lev_comp $(AUX)\endgame.des
  441.     lev_comp $(AUX)\tower.des
  442.     copy castle $(GAMEDIR)
  443.     copy endgame $(GAMEDIR)
  444.     copy tower? $(GAMEDIR)
  445.     del castle
  446.     del endgame
  447.     del tower?
  448.     echo spec_lev done > spec_lev.tag
  449.  
  450. auxil.tag:    spec_lev.tag    data    rumors
  451.     echo special levels created > auxil.tag
  452.  
  453. clean:
  454.     del $(OBJ)\*.o
  455.     del $(OBJ)\*.0
  456.     del $(OBJ)\*.0-1
  457.     del $(OBJ)\*.0-2
  458.     del $(OBJ)\*.0-3
  459.     del $(OBJ)\*.1
  460.     del $(OBJ)\*.1-2
  461.     del $(OBJ)\*.1-3
  462.     del $(OBJ)\*.1-b
  463.     del $(OBJ)\*.2
  464.     del $(OBJ)\*.2-3
  465.     del $(OBJ)\*.2-b
  466.     del $(OBJ)\*.3
  467.     del $(OBJ)\*.3-b
  468.     del $(OBJ)\*.b
  469.     del $(OBJ)\*.obj
  470.     rmdir $(OBJ)
  471.  
  472. spotless: clean
  473.     del $(INCL)\date.h
  474.     del $(INCL)\onames.h
  475.     del $(INCL)\pm.h
  476.     if exist makedefs.exe del makedefs.exe
  477.     if exist lev_comp.exe del lev_comp.exe
  478.     del castle
  479.     del endgame
  480.     del tower?
  481.     del *.bak
  482.     del *.tag
  483.     del *.map
  484.     del *.obj
  485.     del *.lib
  486.     del *.txt
  487.     del $(AUX)\data
  488.     del $(AUX)\rumors
  489.  
  490. # *****************************************************************************
  491. # ************************* Other dependencies ********************************
  492. # *****************************************************************************
  493. # Other dependencies
  494. #
  495. # I deleted that line.    ;-}
  496.  
  497. $(OBJ)\allmain.0:    $(HACK_H)
  498. $(OBJ)\allmain.1:    $(HACK_H)
  499. $(OBJ)\allmain.2-b:    $(HACK_H)
  500. $(OBJ)\alloc.o:     $(CONFIG_H)
  501. $(OBJ)\apply.0:     $(HACK_H)   $(INCL)\edog.h
  502. $(OBJ)\apply.1:     $(HACK_H)   $(INCL)\edog.h
  503. $(OBJ)\apply.2-b:    $(HACK_H)   $(INCL)\edog.h
  504. $(OBJ)\artifact.0:    $(HACK_H)   $(INCL)\artifact.h
  505. $(OBJ)\artifact.1:    $(HACK_H)   $(INCL)\artifact.h
  506. $(OBJ)\artifact.2:    $(HACK_H)   $(INCL)\artifact.h
  507. $(OBJ)\artifact.b:    $(HACK_H)   $(INCL)\artifact.h
  508. $(OBJ)\attrib.0:    $(HACK_H)
  509. $(OBJ)\attrib.1:    $(HACK_H)
  510. $(OBJ)\attrib.2-b:    $(HACK_H)
  511. $(OBJ)\bones.o:     $(HACK_H)
  512. $(OBJ)\cmd.0:        $(HACK_H)   $(INCL)\func_tab.h
  513. $(OBJ)\cmd.1:        $(HACK_H)   $(INCL)\func_tab.h
  514. $(OBJ)\cmd.2-b:     $(HACK_H)   $(INCL)\func_tab.h
  515. $(OBJ)\dbridge.0:    $(HACK_H)
  516. $(OBJ)\dbridge.1-b:    $(HACK_H)
  517. $(OBJ)\decl.o:        $(HACK_H)
  518. $(OBJ)\demon.o:     $(HACK_H)
  519. $(OBJ)\do.0:        $(HACK_H)
  520. $(OBJ)\do.1:        $(HACK_H)
  521. $(OBJ)\do.2:        $(HACK_H)
  522. $(OBJ)\do.3:        $(HACK_H)
  523. $(OBJ)\do.b:        $(HACK_H)
  524. $(OBJ)\do_name.0:    $(HACK_H)
  525. $(OBJ)\do_name.1-b:    $(HACK_H)
  526. $(OBJ)\do_wear.0-1:    $(HACK_H)
  527. $(OBJ)\do_wear.2:    $(HACK_H)
  528. $(OBJ)\do_wear.b:    $(HACK_H)
  529. $(OBJ)\dog.0:        $(HACK_H)   $(INCL)\edog.h
  530. $(OBJ)\dog.1:        $(HACK_H)   $(INCL)\edog.h
  531. $(OBJ)\dog.2:        $(HACK_H)   $(INCL)\edog.h
  532. $(OBJ)\dog.b:        $(HACK_H)   $(INCL)\edog.h
  533. $(OBJ)\dogmove.o:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\edog.h
  534. $(OBJ)\dokick.o:    $(HACK_H)   $(INCL)\eshk.h
  535. $(OBJ)\dothrow.o:    $(HACK_H)
  536. $(OBJ)\eat.0:        $(HACK_H)
  537. $(OBJ)\eat.1:        $(HACK_H)
  538. $(OBJ)\eat.2-b:     $(HACK_H)
  539. $(OBJ)\end.o:        $(HACK_H)   $(INCL)\eshk.h
  540. $(OBJ)\engrave.0-1:    $(HACK_H)
  541. $(OBJ)\engrave.2:    $(HACK_H)
  542. $(OBJ)\engrave.b:    $(HACK_H)
  543. $(OBJ)\exper.o:     $(HACK_H)
  544. $(OBJ)\extralev.o:    $(HACK_H)
  545. $(OBJ)\fountain.o:    $(HACK_H)
  546. $(OBJ)\getline.0-1:    $(HACK_H)   $(INCL)\func_tab.h
  547. $(OBJ)\getline.2:    $(HACK_H)   $(INCL)\func_tab.h
  548. $(OBJ)\getline.b:    $(HACK_H)   $(INCL)\func_tab.h
  549. $(OBJ)\hack.0:        $(HACK_H)
  550. $(OBJ)\hack.1:        $(HACK_H)
  551. $(OBJ)\hack.2:        $(HACK_H)
  552. $(OBJ)\hack.b:        $(HACK_H)
  553. $(OBJ)\invent.0:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  554. $(OBJ)\invent.1:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  555. $(OBJ)\invent.2:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  556. $(OBJ)\invent.3:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  557. $(OBJ)\invent.b:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  558. $(OBJ)\ioctl.o:     $(HACK_H)
  559. $(OBJ)\lev_main.o:    $(HACK_H)   $(INCL)\sp_lev.h
  560. $(OBJ)\lock.0:        $(HACK_H)
  561. $(OBJ)\lock.1-b:    $(HACK_H)
  562. $(OBJ)\mail.0:        $(HACK_H)
  563. $(OBJ)\mail.1-b:    $(HACK_H)
  564. $(OBJ)\makemon.0-2:    $(HACK_H)
  565. $(OBJ)\makemon.b:    $(HACK_H)
  566. $(OBJ)\mcastu.o:    $(HACK_H)
  567. $(OBJ)\mhitm.0:     $(HACK_H)   $(INCL)\artifact.h
  568. $(OBJ)\mhitm.1-b:    $(HACK_H)   $(INCL)\artifact.h
  569. $(OBJ)\mhitu.0-1:    $(HACK_H)   $(INCL)\artifact.h     $(INCL)\edog.h
  570. $(OBJ)\mhitu.2-b:    $(HACK_H)   $(INCL)\artifact.h     $(INCL)\edog.h
  571. $(OBJ)\mklev.o:     $(HACK_H)
  572. $(OBJ)\mkmaze.o:    $(HACK_H)
  573. $(OBJ)\mkobj.0:     $(HACK_H)
  574. $(OBJ)\mkobj.1:     $(HACK_H)
  575. $(OBJ)\mkobj.2-b:    $(HACK_H)
  576. $(OBJ)\mkroom.0:    $(HACK_H)
  577. $(OBJ)\mkroom.1-b:    $(HACK_H)
  578. $(OBJ)\mon.0-1:     $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\wseg.h
  579. $(OBJ)\mon.2-b:     $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\wseg.h
  580. $(OBJ)\mondata.0-1:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  581. $(OBJ)\mondata.2:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  582. $(OBJ)\mondata.b:    $(HACK_H)   $(INCL)\eshk.h     $(INCL)\epri.h
  583. $(OBJ)\monmove.0-1:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\artifact.h
  584. $(OBJ)\monmove.2-b:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\artifact.h
  585. $(OBJ)\monst.o:     $(CONFIG_H) $(PERMONST_H)     $(INCL)\eshk.h \
  586.             $(INCL)\vault.h $(INCL)\epri.h     $(INCL)\color.h
  587. $(OBJ)\msdos.o:     $(HACK_H)
  588. $(OBJ)\mthrowu.0:    $(HACK_H)
  589. $(OBJ)\mthrowu.1:    $(HACK_H)
  590. $(OBJ)\mthrowu.2-b:    $(HACK_H)
  591. $(OBJ)\music.o:     $(HACK_H)
  592. $(OBJ)\o_init.o:    $(HACK_H)
  593. $(OBJ)\objects.o:    $(CONFIG_H) $(INCL)\obj.h     $(INCL)\objclass.h \
  594.             $(INCL)\prop.h    $(INCL)\color.h
  595. $(OBJ)\objnam.0-1:    $(HACK_H)
  596. $(OBJ)\objnam.2-b:    $(HACK_H)
  597. $(OBJ)\options.o:    $(HACK_H)
  598. $(OBJ)\pager.0:     $(HACK_H)
  599. $(OBJ)\pager.1-b:    $(HACK_H)
  600. $(OBJ)\panic.o:     $(CONFIG_H)
  601. $(OBJ)\pickup.0:    $(HACK_H)
  602. $(OBJ)\pickup.1:    $(HACK_H)
  603. $(OBJ)\pickup.2-b:    $(HACK_H)
  604. $(OBJ)\polyself.0-1:    $(HACK_H)
  605. $(OBJ)\polyself.2-b:    $(HACK_H)
  606. $(OBJ)\potion.o:    $(HACK_H)
  607. $(OBJ)\pray.o:        $(HACK_H)
  608. $(OBJ)\pri.0:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  609. $(OBJ)\pri.1:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  610. $(OBJ)\pri.2:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  611. $(OBJ)\pri.b:        $(HACK_H)   $(INCL)\epri.h     $(INCL)\termcap.h
  612. $(OBJ)\priest.0:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\eshk.h \
  613.             $(INCL)\epri.h
  614. $(OBJ)\priest.1-b:    $(HACK_H)   $(INCL)\mfndpos.h     $(INCL)\eshk.h \
  615.             $(INCL)\epri.h
  616. $(OBJ)\prisym.0:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  617. $(OBJ)\prisym.1:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  618. $(OBJ)\prisym.2:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  619. $(OBJ)\prisym.b:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  620. $(OBJ)\random.o:
  621. $(OBJ)\read.0:        $(HACK_H)
  622. $(OBJ)\read.1-b:    $(HACK_H)
  623. $(OBJ)\restore.o:    $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  624. $(OBJ)\rip.o:        $(HACK_H)
  625. $(OBJ)\rnd.0:        $(HACK_H)
  626. $(OBJ)\rnd.1:        $(HACK_H)
  627. $(OBJ)\rnd.2-b:     $(HACK_H)
  628. $(OBJ)\rumors.o:    $(HACK_H)
  629. $(OBJ)\save.o:        $(HACK_H)   $(INCL)\lev.h     $(INCL)\wseg.h
  630. $(OBJ)\search.0:    $(HACK_H)   $(INCL)\artifact.h
  631. $(OBJ)\search.1-b:    $(HACK_H)   $(INCL)\artifact.h
  632. $(OBJ)\shk.0:        $(HACK_H)   $(INCL)\eshk.h
  633. $(OBJ)\shk.1-b:     $(HACK_H)   $(INCL)\eshk.h
  634. $(OBJ)\shknam.0:    $(HACK_H)   $(INCL)\eshk.h
  635. $(OBJ)\shknam.1-b:    $(HACK_H)   $(INCL)\eshk.h
  636. $(OBJ)\sit.o:        $(HACK_H)
  637. $(OBJ)\sounds.0:    $(HACK_H)   $(INCL)\edog.h     $(INCL)\eshk.h
  638. $(OBJ)\sounds.1-b:    $(HACK_H)   $(INCL)\edog.h     $(INCL)\eshk.h
  639. $(OBJ)\sp_lev.o:    $(HACK_H)   $(INCL)\sp_lev.h
  640. $(OBJ)\spell.o:     $(HACK_H)
  641. $(OBJ)\steal.0-1:    $(HACK_H)
  642. $(OBJ)\steal.2-b:    $(HACK_H)
  643. $(OBJ)\termcap.0:    $(HACK_H)   $(INCL)\termcap.h
  644. $(OBJ)\termcap.1:    $(HACK_H)   $(INCL)\termcap.h
  645. $(OBJ)\termcap.2-b:    $(HACK_H)   $(INCL)\termcap.h
  646. $(OBJ)\timeout.0:    $(HACK_H)
  647. $(OBJ)\timeout.1-b:    $(HACK_H)
  648. $(OBJ)\topl.0:        $(HACK_H)
  649. $(OBJ)\topl.1-2:    $(HACK_H)
  650. $(OBJ)\topl.b:        $(HACK_H)
  651. $(OBJ)\topten.o:    $(HACK_H)
  652. $(OBJ)\track.0:     $(HACK_H)
  653. $(OBJ)\track.1:     $(HACK_H)
  654. $(OBJ)\track.2-b:    $(HACK_H)
  655. $(OBJ)\trampoli.o:    $(HACK_H)
  656. $(OBJ)\trap.0-1:    $(HACK_H)   $(INCL)\edog.h
  657. $(OBJ)\trap.2:        $(HACK_H)   $(INCL)\edog.h
  658. $(OBJ)\trap.b:        $(HACK_H)   $(INCL)\edog.h
  659. $(OBJ)\u_init.o:    $(HACK_H)
  660. $(OBJ)\uhitm.o:     $(HACK_H)   $(INCL)\artifact.h
  661. $(OBJ)\vault.0:     $(HACK_H)   $(INCL)\vault.h
  662. $(OBJ)\vault.1-b:    $(HACK_H)   $(INCL)\vault.h
  663. $(OBJ)\version.o:    $(HACK_H)   $(INCL)\date.h     $(INCL)\patchlev.h
  664. $(OBJ)\weapon.0-1:    $(HACK_H)
  665. $(OBJ)\weapon.2-b:    $(HACK_H)
  666. $(OBJ)\were.0:        $(HACK_H)
  667. $(OBJ)\were.1-b:    $(HACK_H)
  668. $(OBJ)\wield.o:     $(HACK_H)
  669. $(OBJ)\wizard.0:    $(HACK_H)
  670. $(OBJ)\wizard.1-b:    $(HACK_H)
  671. $(OBJ)\worm.o:        $(HACK_H)   $(INCL)\wseg.h
  672. $(OBJ)\worn.o:        $(HACK_H)
  673. $(OBJ)\write.o:     $(HACK_H)
  674. $(OBJ)\zap.o:        $(HACK_H)
  675.